{% extends "pages/body.html" %}
{% load i18n %}
{% load pyif %}
{% block meta %}<link rel="stylesheet" href="/site_media/layout/forum.css" type="text/css" />{% endblock %}
{% block crumb %}<a href="/">{% trans "Home" %}</a> > <a href="/forum/">{% trans "Forum Index" %}</a>{% endblock %}
{% block pagemenu %}
<li><a href="/forum/lasttopics/">{% trans "Last Active Topics" %}</a></li>
<li><a href="/forum/mytopics/">{% trans "My Topics" %}</a></li>
<li><a href="/forum/myptopics/">{% trans "My Posts" %}</a></li>
{% endblock %}

{% block content %}
{% for cat in categories %}
          <table>
            <tr>
            <th style="width:20px;"></th>
              <th><strong>{{ cat.name }}</strong></th>
              <th style="width:30px;"><strong>{% trans "Topics" %}</strong></th>
              <th style="width:30px;"><strong>{% trans "Posts" %}</strong></th>
              <th style="width:200px;"><strong>{% trans "Last Post" %}</strong></th>
            </tr>
            {% for forum in cat.forums %}
            <tr class="small">
              <td>{% pyif user.get_profile.last_visit < forum.modification_date %}
                    <img src="/site_media/layout/forum/new.png" alt="*" />
                    {% else %}
                    <img src="/site_media/layout/forum/normal.png" alt="*" />
                    {% endif %}</td>
              <td style="text-align:left;">
                    <a href="/forum/forum/{{ forum.id }}/"><b>{{ forum.name }}</b></a><br />{{ forum.description }}
              </td>
              <td>{{ forum.topics }}</td>
              <td>{{ forum.posts }}</td>
              <td>{% ifnotequal forum.lastposter None %}{{ forum.lastposter}}, {{forum.modification_date|date:"Y.m.d G:i" }}<br />{{ forum.lasttopic|safe }}{% else %}{% trans "No topics in this forum" %}{% endifnotequal %}</td>
            </tr>
	    {% endfor %}
          </table>
<br />
	{% endfor %}
{% endblock %}
